-- GENERATED SPELL FOR [Scourge Necromancer] --


function spell0_31096(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20298,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_31096', 3000, 1)
end

function spell1_31096(pUnit, Event) --@Shadowflame,Self--
pUnit:FullCastSpellOnTarget(51337,pUnit)
pUnit:RegisterEvent('Sorts_31096', 0, 1)
end

function Sorts_31096(pUnit, Event)
local choix_sorts_31096 = math.random(0, 1)
if choix_sorts_31096 == 0 then
pUnit:RegisterEvent('spell0_31096', 1, 1)
end
if choix_sorts_31096 == 1 then
pUnit:RegisterEvent('spell1_31096', 1, 1)
end
end

function mob31096_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_31096', math.random(1500, 3000), 1)
end

function mob31096_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31096_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob31096_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(31096, 1, 'mob31096_Action')
RegisterUnitEvent(31096, 2, 'mob31096_Leave')
RegisterUnitEvent(31096, 3, 'mob31096_Kill')
RegisterUnitEvent(31096, 4, 'mob31096_Die')
